<?php

class EventTagModel extends Model{
    public function listHotTag($limit=20){
    //SELECT `tag`, COUNT(*) AS `tag_cnt` FROM `notice_event_tag` GROUP BY `tag` ORDER BY `tag_cnt` DESC
        return $this->limit($limit)->field(array('tag', 'COUNT(*)' =>'tag_cnt'))
                ->order('tag_cnt DESC')->group('tag')->select();
    }
}
?>